@import '~tracim_frontend_lib/src/css/Variable.styl'

.adminWorkspace
  &__searchBar
    border 1px solid lightGrey1
    background-color offWhite
    margin-top standardSpacing
    margin-bottom standardSpacing * 2
    border-radius standardBorderRadius
    padding 0 standardSpacing
  &__searchBar:focus-within
    border 1px solid lightBlue
  &__searchBar .textInputComponent:focus-within
    border 0

  &__description
    margin-bottom standardSpacing
  &__delimiter
    margin pageSpacing auto
    &__delete
      display flex
      align-items center
      flex-wrap wrap
  &__workspaceTable
    table-layout fixed
    &__tr
      &:hover, &:nth-child(even):hover
        background-color lightGrey1
      &__td-link
        max-width 0
        white-space nowrap
        overflow hidden
        text-overflow ellipsis
        &:not(:hover)
          color inherit
        &__link
          color inherit
          margin -20px auto
          padding 20px
      &__td-description
        max-width 0
        white-space nowrap
        overflow hidden
        text-overflow ellipsis
      & > td
        unicode-bidi plaintext
  &__table__delete__icon
    margin-inline-end 0.75rem

.adminUser
  & .table
    table-layout fixed
    & td
      text-overflow ellipsis
      overflow hidden
    & th
      vertical-align middle
      text-align start
      font-weight normal
      padding standardSpacing 0
      &.adminUser__table__active
        padding standardSpacing
  &__searchBar
    border 1px solid lightGrey1
    background-color offWhite
    margin-top standardSpacing
    margin-bottom standardSpacing * 2
    border-radius standardBorderRadius
    padding 0 standardSpacing
  &__searchBar:focus-within
    border 1px solid lightBlue
  &__searchBar .textInputComponent:focus-within
    border 0

  &__description
    margin-bottom standardSpacing
  &__adduser
    display flex
    align-items center
    &__button
      margin-inline-end standardSpacing
    &__emailstate
      margin-inline-end standardSpacing
      color fontColor
    &__form
      margin-top standardSpacing
      border-radius standardBorderRadius
      padding 0 standardSpacing standardSpacing
      background-color lightGrey2
      &__submit__spaces
        margin-inline-end standardSpacing
      &__userData
        .userData
          &__text
            font-weight bold
            margin-top standardSpacing
            margin-bottom 0px
          &__input
            width 300px
            &__username
              &__errorMsg
                width 300px
                font-size metadataFontSize
                text-align end
                color errorRed
              &__errorIcon
                margin-inline-end textSpacing
              &__errorInfo
                width 300px
                font-size metadataFontSize
                text-align end
          &__info
            color grey
            &__icon
              margin 0 textSpacing
          &__email
            &__info
              background-color transparent
              border none
              color grey
              cursor pointer
              &:focus
                box-shadow 0 0 0 0
                border 0 none
                outline 0
      &__profile
        .profile
          &__text
            margin-top standardSpacing
            font-weight bold
          &__list
            margin standardSpacing 0
            &__item
              display flex
              align-items center
              margin-bottom 0px
              margin-top standardSpacing
              cursor pointer
              &__content
                &__description
                  color grey
                & > input
                  cursor pointer
  &__delimiter
    margin pageSpacing auto
  &__table
    &__tr
      &:hover, &:nth-child(even):hover
        background-color lightGrey1
      &.user-deactivated
        color grey
      &__td-link
        & > a
          color fontColor
          width 100%
          display block
        &:not(:hover)
          color inherit
        & > i
          margin-inline-end textSpacing
        & .profileNavigation:hover
          text-decoration underline
    &__active
      width 10%
    &__profile
      // INFO - GB - 2022-01-05 - 12px = 0.75rem is the bootstrap padding for ".table td, .table th" + fa-fw correction
      width bigIconSize + (2 * 14.5px)
      &__icon
        vertical-align middle
        font-size bigIconSize
    &__fullName
      width 20%
    &__username, &__line__username
      width 20%
    &__user
      display none
    &__email, &__line__email
      width 20%
    &__canCreate
      width 15%
    &__administrator
      width 15%
    &__line
      &__username
        direction ltr
      &__email
        direction ltr

.adminWorkspace
  &__workspaceTable
    & th
      text-align start
    & .table
      &__id
        width 5%
        text-align center
      &__type
        text-align center
        & i
          font-size bigIconSize
          &.titleListHeader__icon
            font-size standardFontSize
        & .label
          font-size metadataFontSize
      &__sharedSpace
        width 15%
      &__description
        width 60%
      &__memberCount
        width 10%
        text-align center
      &__delete
        width 10%
        vertical-align middle
        font-weight normal

.adminUser
  &__right
    width 35%
    display inline
    float right
  &__left
    width 60%
    display inline
    float left

.formInfo > span
  margin-inline-start 0.5%
  margin-inline-end 0.5%

.formInfo > button
  margin-inline-start 2%

.fieldInfo
  & input
    width 100%
  & textarea
    width 100%

@media (min-width: min-sm) and (max-width: max-md)
  .adminWorkspace
    &__workspaceTable
      & .table
        &__description
          width 50%
        &__memberCount
          width 15%
        &__delete
          width 15%

@media (max-width: max-sm)
  .adminUser
    &__table
      &__profile
        // INFO - GB - 2022-01-05 - 12px = 0.75rem is the bootstrap padding for ".table td, .table th" + fa-fw correction
        width standardFontSize + (2 * 14.5px)
        &__icon
          font-size standardFontSize
      &__fullName
        display none
      &__username, &__line__username
        display none
      &__user
        display table-cell
        width 35%

@media (max-width: max-xs)
  .adminWorkspace
    &__workspaceTable
      & .table
        &__id
          width 10%
        &__sharedSpace
          width 30%
        &__description
          width 0%
          display none
        &__memberCount
          width 30%
        &__delete
          width 30%
        &__type
          & i
            font-size standardFontSize
          & .label
            display none
